package com.xdk.templatescala.common.enums;

/**
 * 工作流状态
 */
public enum WorkflowStatusEnum {

    INIT(1,"初始化"),

    START_UP(2,"启动"),

    SHUT_OFF(3,"关闭");

    public final Integer num;

    public final String type;

    WorkflowStatusEnum(Integer num, String type){
        this.num=num;
        this.type=type;
    }

    public static String getTypeByNum(Integer num){
        WorkflowStatusEnum[] values = WorkflowStatusEnum.values();
        for (int i = 0; i < values.length; i++) {
            if (values[i].num.equals(num)){
                return values[i].type;
            }
        }
        return null;
    }
}
